﻿@model Hospital
@{
    ViewBag.Title = "实验室标准";
    Layout = "~/Views/Shared/Master.cshtml";
}
@{Html.Telerik().Window().Name("LabCheckStdWindow").Title("实验室标准").HtmlAttributes(new { @class = "ContentLargeWindow" })
      .Buttons(buttom => buttom.Clear())
      .Content(
    @<text>
    @tabStrip()
    </text>
).Render();
}
@helper tabStrip()
{
    LabCheckStd maleStd = Model.LabCheckStds.Where(l => l.Gender == (byte)GenderTypes.Male).SingleOrDefault();
    LabCheckStd femaleStd = Model.LabCheckStds.Where(l => l.Gender == (byte)GenderTypes.Female).SingleOrDefault();
    Html.Telerik().TabStrip().Name("LabCheckStdTab").SelectedIndex(0)
        .Items(items =>
            {
                items.Add().Text("男性标准").Content(@<text>
                @if(maleStd != null)
                {
                    @(Html.Action<LabCheckStdController>(l => l.LabCheckStdDetailInfo(maleStd.ID)))
                }
                else
                {
                    @(Html.Partial("LabCheckStdAddNull", new LabCheckStd { HospitalID = Model.ID, Gender = (byte)GenderTypes.Male }))
                }
                </text>);
                items.Add().Text("女性标准").Content(@<text>
                @if(femaleStd != null)
                {
                    @(Html.Action<LabCheckStdController>(l => l.LabCheckStdDetailInfo(femaleStd.ID)))
                }
                else
                {
                    @(Html.Partial("LabCheckStdAddNull", new LabCheckStd { HospitalID = Model.ID, Gender = (byte)GenderTypes.Female }))
                }
                </text>);
            }).Render();
}